/**
 * Created by lub_lenovo on 2017/11/2.
 */
ittaoli={
    //序列化表单
    serializeObject: function(form) {
        var o = {};
        $.each(form.serializeArray(), function(index) {
            if (o[this['name']]) {
                o[this['name']] = o[this['name']] + "," + this['value'];
            } else {
                o[this['name']] = this['value'];
            }
        });
        return o;
    }
}
$('#btnSubmit').click(function(e){
    // action="${pageContext.request.contextPath}/nav/doAdd.do";
    var param=ittaoli.serializeObject($('#fmNav'));
    $.post("/nav/doAdd.do",{navStr:JSON.stringify(param)},function(data){
        console.log(data);
    });
});